import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout.vue'
import User from '@/views/user.vue'
import Find from '@/views/find.vue'
import Consult from '@/views/consult.vue'
// import City from '@/views/city.vue'

import Ariticle from '@/views/ariticle.vue'
const City = () => import('@/views/city.vue')

Vue.use(VueRouter)

const routes = [
  { path: '/city', component: City },
  {
    path: '/',
    component: Layout,
    redirect: '/ariticle',
    children: [
      {
        path: 'ariticle',
        component: Ariticle
      },
      { path: 'user', component: User },
      { path: 'find', component: Find },
      { path: 'consult', component: Consult }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
